Optimal. Leaf size=151 \[ \frac {\cot (e+f x)}{2 a^2 c^2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}-\frac {\cot ^3(e+f x)}{4 a^2 c^2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}+\frac {\log (\sin (e+f x)) \tan (e+f x)}{a^2 c^2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 151, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {3990, 3554,
3556} \begin {gather*} -\frac {\cot ^3(e+f x)}{4 a^2 c^2 f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}+\frac {\cot (e+f x)}{2 a^2 c^2 f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}}+\frac {\tan (e+f x) \log (\sin (e+f x))}{a^2 c^2 f \sqrt {a \sec (e+f x)+a} \sqrt {c-c \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3554
Rule 3556
Rule 3990
Rubi steps
\begin {align*} \int \frac {1}{(a+a \sec (e+f x))^{5/2} (c-c \sec (e+f x))^{5/2}} \, dx &=\frac {\tan (e+f x) \int \cot ^5(e+f x) \, dx}{a^2 c^2 \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=-\frac {\cot ^3(e+f x)}{4 a^2 c^2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}-\frac {\tan (e+f x) \int \cot ^3(e+f x) \, dx}{a^2 c^2 \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=\frac {\cot (e+f x)}{2 a^2 c^2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}-\frac {\cot ^3(e+f x)}{4 a^2 c^2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}+\frac {\tan (e+f x) \int \cot (e+f x) \, dx}{a^2 c^2 \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ &=\frac {\cot (e+f x)}{2 a^2 c^2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}-\frac {\cot ^3(e+f x)}{4 a^2 c^2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}+\frac {\log (\sin (e+f x)) \tan (e+f x)}{a^2 c^2 f \sqrt {a+a \sec (e+f x)} \sqrt {c-c \sec (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 2.26, size = 149, normalized size = 0.99 \begin {gather*} \frac {\csc ^3(e+f x) \left (2-3 i f x+\cos (2 (e+f x)) \left (-4+4 i f x-4 \log \left (1-e^{2 i (e+f x)}\right )\right )+3 \log \left (1-e^{2 i (e+f x)}\right )+\cos (4 (e+f x)) \left (-i f x+\log \left (1-e^{2 i (e+f x)}\right )\right )\right ) \sec (e+f x)}{8 a^2 c^2 f \sqrt {a (1+\sec (e+f x))} \sqrt {c-c \sec (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.29, size = 237, normalized size = 1.57
method | result | size |
default | \(-\frac {\left (-1+\cos \left (f x +e \right )\right )^{3} \left (32 \left (\cos ^{4}\left (f x +e \right )\right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-32 \left (\cos ^{4}\left (f x +e \right )\right ) \ln \left (\frac {2}{\cos \left (f x +e \right )+1}\right )-13 \left (\cos ^{4}\left (f x +e \right )\right )-64 \left (\cos ^{2}\left (f x +e \right )\right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+64 \left (\cos ^{2}\left (f x +e \right )\right ) \ln \left (\frac {2}{\cos \left (f x +e \right )+1}\right )-6 \left (\cos ^{2}\left (f x +e \right )\right )+32 \ln \left (-\frac {-1+\cos \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-32 \ln \left (\frac {2}{\cos \left (f x +e \right )+1}\right )+11\right ) \sqrt {\frac {a \left (\cos \left (f x +e \right )+1\right )}{\cos \left (f x +e \right )}}}{32 f \sin \left (f x +e \right )^{5} \cos \left (f x +e \right )^{2} \left (\frac {c \left (-1+\cos \left (f x +e \right )\right )}{\cos \left (f x +e \right )}\right )^{\frac {5}{2}} a^{3}}\) | \(237\) |
risch | \(\frac {\left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) x}{a^{2} c^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}}-\frac {2 \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) \left (f x +e \right )}{a^{2} c^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}+\frac {4 i \left ({\mathrm e}^{6 i \left (f x +e \right )}-{\mathrm e}^{4 i \left (f x +e \right )}+{\mathrm e}^{2 i \left (f x +e \right )}\right )}{a^{2} c^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{3} \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}-\frac {i \left ({\mathrm e}^{i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-1\right ) \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{a^{2} c^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \sqrt {\frac {a \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \sqrt {\frac {c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{2}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}\) | \(476\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1505 vs.
\(2 (145) = 290\).
time = 0.79, size = 1505, normalized size = 9.97 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 5.30, size = 610, normalized size = 4.04 \begin {gather*} \left [-\frac {162 \, {\left (\cos \left (f x + e\right )^{4} - 2 \, \cos \left (f x + e\right )^{2} + 1\right )} \sqrt {-a c} \log \left (-\frac {8 \, {\left ({\left (256 \, \cos \left (f x + e\right )^{5} - 512 \, \cos \left (f x + e\right )^{3} + 175 \, \cos \left (f x + e\right )\right )} \sqrt {-a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}} - {\left (256 \, a c \cos \left (f x + e\right )^{4} - 512 \, a c \cos \left (f x + e\right )^{2} + 337 \, a c\right )} \sin \left (f x + e\right )\right )}}{{\left (\cos \left (f x + e\right )^{2} - 1\right )} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + {\left (832 \, \cos \left (f x + e\right )^{5} - 1988 \, \cos \left (f x + e\right )^{3} + 1075 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{324 \, {\left (a^{3} c^{3} f \cos \left (f x + e\right )^{4} - 2 \, a^{3} c^{3} f \cos \left (f x + e\right )^{2} + a^{3} c^{3} f\right )} \sin \left (f x + e\right )}, -\frac {324 \, {\left (\cos \left (f x + e\right )^{4} - 2 \, \cos \left (f x + e\right )^{2} + 1\right )} \sqrt {a c} \arctan \left (\frac {{\left (16 \, \cos \left (f x + e\right )^{3} - 7 \, \cos \left (f x + e\right )\right )} \sqrt {a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{{\left (16 \, a c \cos \left (f x + e\right )^{2} - 25 \, a c\right )} \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + {\left (832 \, \cos \left (f x + e\right )^{5} - 1988 \, \cos \left (f x + e\right )^{3} + 1075 \, \cos \left (f x + e\right )\right )} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) - c}{\cos \left (f x + e\right )}}}{324 \, {\left (a^{3} c^{3} f \cos \left (f x + e\right )^{4} - 2 \, a^{3} c^{3} f \cos \left (f x + e\right )^{2} + a^{3} c^{3} f\right )} \sin \left (f x + e\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.04, size = 225, normalized size = 1.49 \begin {gather*} -\frac {\frac {32 \, \log \left ({\left | c \right |} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}\right )}{\sqrt {-a c} a^{2} c {\left | c \right |}} + \frac {64 \, \sqrt {-a c} \log \left ({\left | c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + c \right |}\right )}{a^{3} c^{2} {\left | c \right |}} - \frac {48 \, {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c\right )}^{2} + 84 \, {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c\right )} c + 37 \, c^{2}}{\sqrt {-a c} a^{2} c^{3} {\left | c \right |} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4}} + \frac {{\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c\right )}^{2} \sqrt {-a c} a^{3} c^{4} {\left | c \right |} - 10 \, {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c\right )} \sqrt {-a c} a^{3} c^{5} {\left | c \right |}}{a^{6} c^{10}}}{64 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {1}{{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^{5/2}\,{\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________